package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.body.SignflowsSignflowsHandSignParamBody;
import net.yondervision.hrfsp.sdk.esign.domain.request.path.SignflowsSignflowsHandSignParamPath;
import net.yondervision.hrfsp.sdk.esign.domain.response.SignflowsSignflowsHandSignResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/09/28 14:15
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SignflowsSignflowsHandSignRequest extends AbstractESignRequest implements
    ESignRequest<SignflowsSignflowsHandSignResponse> {

  private SignflowsSignflowsHandSignParamPath signflowsSignflowsHandSignParamPath;
  private SignflowsSignflowsHandSignParamBody signflowsSignflowsHandSignParamBody;

  public SignflowsSignflowsHandSignRequest(
      SignflowsSignflowsHandSignParamPath signflowsSignflowsHandSignParamPath,
      SignflowsSignflowsHandSignParamBody signflowsSignflowsHandSignParamBody) {
    this.signflowsSignflowsHandSignParamPath = signflowsSignflowsHandSignParamPath;
    this.signflowsSignflowsHandSignParamBody = signflowsSignflowsHandSignParamBody;
    this.setParamPath(signflowsSignflowsHandSignParamPath);
    this.setParamBody(signflowsSignflowsHandSignParamBody);
  }

  @Override
  public String getUrl() {
    return "/signflows/{flowId}/signfields/handSign";
  }

  @Override
  public Method getMethodType() {
    return Method.POST;
  }

  @Override
  public Class<SignflowsSignflowsHandSignResponse> getResponseClass() {
    return SignflowsSignflowsHandSignResponse.class;
  }

}
